package website.seamonster.ethegg.exception;

import lombok.Data;
import website.seamonster.ethegg.enums.ResultEnum;

/**
 * Created by 罗海量
 * 2018-07-23 23:41
 */
@lombok.extern.slf4j.Slf4j
@Data
public class EthException extends RuntimeException{
    private Integer code;

    public EthException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public EthException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}
